#ifndef AXLMS1XXLASER_H
#define AXLMS1XXLASER_H

#include <Eigen/Dense>
#include <QThread>
#include "axsick/LMS1xx.h"
#include "AxConfiguration.h"
#include "axmapcontrol.h"
#include "AxExtrapolator.h"

class AxLMS1xxLaser : public QThread
{
	Q_OBJECT
	
public:
	AxLMS1xxLaser(QObject *parent);
	AxLMS1xxLaser(AxExtrapolator* extrapolator_);
	~AxLMS1xxLaser();
	void run(void);
	int open(QString strIP, int port_);
	void startRecord();
	void stop();
	void save();

	LMS1xx laser;
	scanData data;
	int num_values;
	scanCfg cfg;
	bool is_pause;
	AxMapControl *viewer;
	AxConfiguration config;
	AxExtrapolator* extrapolator;
	QMutex global_Mutex;
signals:
	void receive_failed(const char* error_message);
	void received(void);
private:
	SensorMap* m_sensorMap;
	RangeSensor* m_Laser;
};

#endif // AXURGLASER_H
